package com.youlu.campus.admin.task;

import com.youlu.campus.service.learning.DailyLearningService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class DailyLearningTask {
    @Autowired
    private DailyLearningService dailyLearningService;

    /**
     * 每天00:05执行一次
     */
    @Scheduled(cron = "0 05 0 * * ?")
    public void doAutoCreate(){
        log.info("开始执行自动配置学习签到");
        dailyLearningService.autoCreate();
    }
}